﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<!-- saved from url=(0051)http://www.94this.com.cn/myCode/editTable/demo.html -->
<HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>jquery editable plugin--编辑文字的插件</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<SCRIPT src="jquery editable plugin--编辑文字的插件.files/jquery-1.3.2.min.js" 
type=text/javascript></SCRIPT>

<SCRIPT src="jquery editable plugin--编辑文字的插件.files/jquery.editable-1.3.3.js" 
type=text/javascript></SCRIPT>

<SCRIPT type=text/javascript>
$(document).ready(function(){
$(".d").editable({editBy:"dblclick",editClass:'ipt',onSubmit:onSub});
});
function onSub(content){
var t=this;
this.addClass("subCss");
$.post(
"dbin.asp",
{t:content.current},
function(data){
  if(data="0"){
    alert("更新成功");
  }
  else{
    alert("更新失败");
  }
  t.removeClass("subCss");
}
);
}
</SCRIPT>

<STYLE type=text/css>.d {
	FONT-SIZE: 12px; COLOR: #ff99cc; LINE-HEIGHT: 25px
}
.ipt {
	BORDER-RIGHT: #ffcc66 1px solid; BORDER-TOP: #ffcc66 1px solid; BORDER-LEFT: #ffcc66 1px solid; BORDER-BOTTOM: #ffcc66 1px solid
}
.subCss {
	BACKGROUND: url(indicator_tiny_red.gif) no-repeat 100px center
}
</STYLE>

<META content="MSHTML 6.00.2900.5945" name=GENERATOR></HEAD>
<BODY>更新过后可以打开数据库看看是不是已经保存到数据库了 
<DIV class=d>编辑</DIV></BODY></HTML>
